% TEST_ID: LANG-CONTROL-FLOW-0013
% CATEGORY: language/control-flow
% try-catch 语句

function test_try_catch
    a = 1;
    try
        a = 2;
        error("%s", "hello")
    catch e
        assert(a == 2);
        assert(e.message == "hello")
    end

    b = 1;
    try
        error("some error")
        b = 2;
    catch e
        assert(b == 1);
        assert(e.message == "some error")
    end

end

